package com.yequan.designpattern.proxy.dynamic_proxy.jdk.second_generation;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class DynamicProxy<T> {

    public static <T> T newProxyInstance(ClassLoader classLoader, Class<?>[] interfaces, InvocationHandler ih){
        if (true){
            new BeforeAdvice().exec();
        }
        return (T) Proxy.newProxyInstance(classLoader,interfaces,ih);
    }

}
